/**
 * Copyright (C) 2025 pony working team
 * SPDX-License-Identifier: MulanPSL-2.0
 */

/* define to prevent recursive inclusion -------------------------------------*/
#ifndef __PONY_CST816X_H__
#define __PONY_CST816X_H__

/* includes (standard library, system) ---------------------------------------*/
#include <stdint.h>
/* includes (other library) --------------------------------------------------*/
/* includes (project) --------------------------------------------------------*/
/* includes (local) ----------------------------------------------------------*/
#include <pony/tp/tp.h>

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

/* defines -------------------------------------------------------------------*/

#define CST816X_REG_DEVICE_MODE       0x00
#define CST816X_REG_GESTURE_ID        0x01
#define CST816X_REG_FINGER_NUM        0x02
#define CST816X_REG_X_POS_H           0x03
#define CST816X_REG_X_OPS_L           0x04
#define CST816X_REG_Y_POS_H           0x05
#define CST816X_REG_Y_POS_L           0x06
#define CST816X_REG_ID_G_THGROUP      0x80
#define CST816X_REG_ID_G_PERIODACTIVE 0x88
#define CST816X_REG_CHIP_ID           0xA7
#define CST816X_REG_PROJ_ID           0xA8
#define CST816X_REG_FW_VER            0xA9
#define CST816X_REG_BPC0_H            0xB0
#define CST816X_REG_BPC0_L            0xB1
#define CST816X_REG_BPC1_H            0xB2
#define CST816X_REG_BPC1_L            0xB3
#define CST816X_REG_MOTION_MASK       0xEC
#define CST816X_REG_IRQ_PLUSE_WIDTH   0xED
#define CST816X_REG_NOR_SCAN_PER      0xEE
#define CST816X_REG_MOTION_S1_ANGLE   0xEF
#define CST816X_REG_LP_SCAN_RAW1_H    0xF0
#define CST816X_REG_LP_SCAN_RAW1_L    0xF1
#define CST816X_REG_LP_SCAN_RAW2_H    0xF2
#define CST816X_REG_LP_SCAN_RAW2_L    0xF3
#define CST816X_REG_LP_AUTO_WAKE_TIME 0xF4
#define CST816X_REG_LP_SCAN_TH        0xF5
#define CST816X_REG_LP_SCAN_PER       0xF6
#define CST816X_REG_LP_SCAN_FREQ      0xF7
#define CST816X_REG_LP_SCAN_IDAC      0xF8
#define CST816X_REG_AUTO_SLEEP_TIME   0xF9
#define CST816X_REG_IRQ_CTL           0xFA
#define CST816X_REG_AUTO_RESET        0xFB
#define CST816X_REG_LONG_PRESS_TIME   0xFC
#define CST816X_REG_IO_CTL            0xFD
#define CST816X_REG_DIS_AUTO_SLEEP    0xFE

/* typedefs ------------------------------------------------------------------*/
/* macro ---------------------------------------------------------------------*/
/* inlines -------------------------------------------------------------------*/
/* externs -------------------------------------------------------------------*/

#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif /* __PONY_CST816X_H__ */
